#include "stdafx.h"
#include "IMultInterface2.h"
#include "RealISub1.h"

RealISub1::RealISub1()
{
}

RealISub1::~RealISub1()
{
}

HRESULT STDMETHODCALLTYPE RealISub1::QueryInterface(REFIID riid, void **ppv)
{
    IBase *pBase = (IBase *)((char *)this - offsetof(IMultInterface, sub1));
    return pBase->QueryInterface(riid, ppv);
}

ULONG STDMETHODCALLTYPE RealISub1::AddRef()
{
    IBase *pBase = (IBase *)((char *)this - offsetof(IMultInterface, sub1));
    return pBase->AddRef();
}

ULONG STDMETHODCALLTYPE RealISub1::Release()
{
    IBase *pBase = (IBase *)((char *)this - offsetof(IMultInterface, sub1));
    return pBase->Release();
}

HRESULT STDMETHODCALLTYPE RealISub1::ShowMessage(BSTR str)
{
    MessageBoxW(NULL, str, L"IMultInterface", MB_OK);
    return S_OK;
}
